package cn.miju.database.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <pre>
 * 退款订单
 * </pre>
 *
 * @author zhuming
 * @version 1.0.0
 * @since 2023-03-07 22:36
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@TableName("refund_order")
@EqualsAndHashCode(callSuper = true)
public class RefundOrder extends AutoEntity implements Serializable {

    private static final long serialVersionUID = 8810828329995028594L;

    /**
     * 商户ID
     */
    private Long merchantId;
    /**
     * 支付订单ID
     */
    private Long payOrderId;
    /**
     * 接入方退款单号、商户退款订单号
     */
    private String outRefundNo;
    /**
     * 平台退款单号;生成规则：MJR+时间戳(秒)+5位随机数
     */
    private String platRefundNo;
    /**
     * 退款金额;单位：分
     */
    private Integer refundAmount;
    /**
     * 交易单号;支付服务商退款订单唯一号
     */
    private String tradeNo;
    /**
     * 退款时间
     */
    private LocalDateTime refundTime;
    /**
     * 退款结果描述
     */
    private String refundResult;
    /**
     * 状态
     */
    private String status;
}
